﻿<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link rel="stylesheet" href="/css/default.css" />
    <script src="../Scripts/jquery-2.1.0.js"></script>
    <script src="../Scripts/jquery-2.1.0.min.js"></script>
    <script src="../js/MobileServices.js"></script>
    <script src="../js/storage.js"></script>
    <script src="../js/fb.js"></script>
    <script src="../js/trialExtension.js"></script>
    
</head>
<body>
    <div data-win-control="SdkSample.ScenarioInput">
        <h3 id="trialModeHead">Trial-Extension Scenario</h3>
        <p>
            This scenario illustrates how an app can determine what type of license the customer has and then enable the products that correspond to that license.
        </p>
        <p id="currentLicenseMode" class="outputInInput">
            <!-- This is filler text. The displayed text is provided by updateCurrentLicenseMode() -->
            No license data.
        </p>
        <p>
            <button id="trialTime" title="Calculate remaining trial time">
                Trial period
            </button>
            Read the expiration date of the trial period, subtract today's date from the expiration date, and then display the result, converted to days, in the output area. After the customer buys the app,
            the expiration date is no longer meaningful.
        </p>
        <p style="display: none">
            You could use this to inform the customer that the trial period is ending soon and encourage them to buy the full version.
        </p>
        <p>
            <button id="trialProduct" title="Determine if the app is in its trial period.">
                Trial mode
            </button>
            Read the current license state to enable a product during the trial period and display the result in the output area.
        </p>
        <p style="display: none">
            This might be used for a product that is only available before the customer buys the app, such as displaying a banner to indicate they are running a trial version.
        </p>
        <p>
            <button id="fullProduct" title="Determine if the app has been purchased and if the customer has a full license for it.">
                Purchased
            </button>
            Read the current license state to enable a product that can only be used after the customer buys the app.
            Display the result in the output area. Click <strong>Buy app</strong> to buy the app, and then try this button again.
        </p>
        <p>
            <button id="convertTrial" title="Display the purchase dialog box so the customer can buy the app and get a full license.">
                Buy app
            </button>
            Read the app's price from the Store API and display it here.
        </p>
        <div id="purchasePrice" class="outputInInput">
            <!-- The displayed text is provided by trialModeRefreshScenario() -->
        </div>
        <!--<p>
            Click <strong>Buy app</strong> to display the purchase dialog box and update the license state according to the value it returns.
        </p>-->
        <p>
            <button id="Login" title="Login to insert a db entry with your fb-id (first time user)">
                Get Trial Version
            </button>
            If you don't have a license , you can get a trial license valid for 30 days
        </p>
        <p>
            <button id="TotalShares" title="Click to view your total shares">
                Total Shares
            </button>
            Click to view your total shares of this app
        </p>
        <p>
            <button id="Share" title="Share to extend trial period by 1 day">
                Share
            </button>
            Share to extend trial period by 1 day ( Please wait for share complete message to show up after click )
        </p>

        <p>
            <button id="reset" title="Click to delete your account information from the db.">
                Reset
            </button>
            Delete your account information and start afresh.
        </p>

    </div>

    <div data-win-control="SdkSample.ScenarioOutput">
        <div id="user-identity"></div>
    </div>
</body>
</html>